package com.kk.my_pro.common.utility.thread;

import com.kk.my_pro.entity.User;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
public class RequestInfo {
    private static final ThreadLocal<RequestInfo> REQUEST_INFO = new ThreadLocal<>();
    User user;

    public static RequestInfo get() {
        return REQUEST_INFO.get();
    }

    public static void set(RequestInfo requestInfo) {
        REQUEST_INFO.set(requestInfo);
    }

    public static void remove() {
        REQUEST_INFO.remove();
    }
}
